package com.mes.biz.domain;

import javax.validation.Valid;
import java.math.BigDecimal;
import javax.validation.constraints.NotBlank;
import lombok.Data;
import com.mes.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.mes.common.utils.log.annotation.FieldRemark;
import com.mes.common.utils.log.annotation.LogField;
import com.mes.common.annotation.Excel;

/**
 * 商品库存对象 biz_stock
 * @author wy
 * @email wy
 * @date 2023-05-24
 */
@Data
public class BizStock extends BaseEntity<BizStock>
{
    private static final long serialVersionUID = 1L;

    /** 商品id */
    @Excel(name = "商品id")
    @LogField
    @FieldRemark(name = "商品id",field = "productId")
    private String productId;

    /** 单位 */
    @Excel(name = "单位")
    @LogField
    @FieldRemark(name = "单位",field = "unit")
    private String unit;

    /** 仓库id */
    @Excel(name = "仓库id")
    @LogField
    @FieldRemark(name = "仓库id",field = "warehouseId")
    private String warehouseId;

    /** 库位id */
    @Excel(name = "库位id")
    @LogField
    @FieldRemark(name = "库位id",field = "spaceId")
    private String spaceId;

    /** 当前库存数量 */
    @Excel(name = "当前库存数量")
    @LogField
    @FieldRemark(name = "当前库存数量",field = "currentNumber")
    private BigDecimal currentNumber;

    /** 租户id */
    @Excel(name = "租户id")
    @NotBlank(message = "租户id不允许为空")
    @LogField
    @FieldRemark(name = "租户id",field = "tenantId")
    private String tenantId;

    public void setProductId(String productId)
    {
        this.productId = productId;
    }

    public String getProductId()
    {
        return productId;
    }

    public void setUnit(String unit)
    {
        this.unit = unit;
    }

    public String getUnit()
    {
        return unit;
    }

    public void setWarehouseId(String warehouseId)
    {
        this.warehouseId = warehouseId;
    }

    public String getWarehouseId()
    {
        return warehouseId;
    }

    public void setSpaceId(String spaceId)
    {
        this.spaceId = spaceId;
    }

    public String getSpaceId()
    {
        return spaceId;
    }

    public void setCurrentNumber(BigDecimal currentNumber)
    {
        this.currentNumber = currentNumber;
    }

    public BigDecimal getCurrentNumber()
    {
        return currentNumber;
    }

    public void setTenantId(String tenantId)
    {
        this.tenantId = tenantId;
    }

    public String getTenantId()
    {
        return tenantId;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("productId", getProductId())
            .append("unit", getUnit())
            .append("warehouseId", getWarehouseId())
            .append("spaceId", getSpaceId())
            .append("currentNumber", getCurrentNumber())
            .append("tenantId", getTenantId())
            .append("remark", getRemark())
            .append("id", getId())
            .append("createBy", getCreateBy())
            .append("createDept", getCreateDept())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("updateIp", getUpdateIp())
            .append("version", getVersion())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
